<template>
	<view class="diy-title pr"
		:style="{
			padding: itemData?.style?.paddingTop + 'px' + ' 10px',
			background: itemData?.style?.background
		}"
		@click="gotoPages(item)">
		<view class="notice-icon pr" :style="{background: itemData?.style?.background }"
			v-if="itemData?.params?.showIcon=='yes'">
			<image :src="itemData?.params?.icon" mode="aspectFill"></image>
		</view>
		<text class="pr notice-text text-ellipsisss fb diy-title-text"
			:style="{
				background: itemData?.style?.background,
				color: itemData?.style?.textColor,
				fontSize: `${itemData?.style?.textSize}px`,
				fontWeight: itemData?.style?.weight
			}">
			{{ itemData?.params?.title }}
		</text>
		<view class="center-line"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {};
		},
		props: ['itemData'],
		created() {},
		methods: {
			/*跳转页面*/
			gotoPages(e) {
				// this.gotoPage(e.linkUrl);
			}
		}
	};
</script>

<style>
	.diy-title {
		display: flex;
		justify-content: center;
		align-items: center;
		margin-bottom: 20rpx;
	}

	.diy-title .notice-icon {
		display: flex;
		align-items: center;
		background-color: #FFFFFF;
		padding: 0 10rpx;
		z-index: 1;
	}

	.diy-title .notice-icon image {
		width: 26px;
		height: 26px;
	}

	.diy-title .notice-text {
		overflow: hidden;
		white-space: nowrap;
		background-color: #FFFFFF;
		padding: 0 10rpx;
		z-index: 1;
	}
	.center-line{
		width: 490rpx;
		height: 2rpx;
		background-color: #c7c7c7;
		border-radius: 2rpx;
		position: absolute;
		left: 0;
		bottom: 0;
		top: 0;
		right: 0;
		margin: auto;
		z-index: 0;
	}
	.diy-title-text {
		font-size: 38rpx;
	}
</style>
